home *** CD-ROM | disk | FTP | other *** search
- PROGRAM ScrDemo;
- Uses Crt,Screens,Windows;
-
- VAR
- W1,W2,W3,W4 : WindowPtr;
- Ch : CHAR;
- InitScreen : ScrPtr;
-
- BEGIN
- CursorOff;
- InitScreen := SaveScreen;
- SetVirtualPage(1);
- FillArea(1,1,25,80,LightCyan+BlueBG,#176);
- NEW(W1,Init);
- ShadowColor := Blue;
- W1^.MakeWin(10,20,15,60,White+RedBG,RedBG,SolidBrdr,#32,TRUE);
- W1^.WriteWinC(12,'This is Page 1');
- W1^.WriteWinC(13,'Press any key....');
-
- SetVirtualPage(2);
- FillArea(1,1,25,80,LightCyan+GreenBG,#176);
- NEW(W2,Init);
- ShadowColor := Green;
- W2^.MakeWin(10,20,15,60,White+MagentaBG,MagentaBG,DoubleBrdr,#32,TRUE);
- W2^.WriteWinC(12,'This is Page 2');
- W2^.WriteWinC(13,'Press any key....');
-
- SetVirtualPage(3);
- FillArea(1,1,25,80,Yellow+BlackBG,#176);
- NEW(W3,Init);
- ShadowColor := Brown;
- W3^.MakeWin(10,20,15,60,White+RedBG,RedBG,Stars,#32,TRUE);
- W3^.WriteWinC(12,'This is Page 3');
- W3^.WriteWinC(13,'Press any key....');
-
- SetVirtualPage(0);
- FillArea(1,1,25,80,LightMagenta+BlackBG,#176);
- NEW(W4,Init);
- ShadowColor := Magenta;
- W4^.MakeWin(10,20,15,60,White+RedBG,RedBG,Stars,#32,TRUE);
- W4^.WriteWinC(12,'This is Page 0');
- W4^.WriteWinC(13,'Press any key....');
-
- Ch := ReadKey;
- SetVisiblePage(1);
- Ch := ReadKey;
- SetVisiblePage(2);
- Ch := ReadKey;
- SetVisiblePage(3);
- Ch := ReadKey;
- SetVisiblePage(0);
- Ch := ReadKey;
- DISPOSE(W1,Done);
- SetVirtualPage(1);
- DISPOSE(W2,Done);
- SetVirtualPage(2);
- DISPOSE(W3,Done);
- SetVirtualPage(3);
- DISPOSE(W4,Done);
- SetVirtualPage(0);
- RestoreScreen(InitScreen);
- CursorOn;
- END.